using System;
using System.Runtime.Serialization;
using Director.StockSharp.Transaq.Native.Responses;

namespace Director.DomainModels
{
	[DataContract]
	public class Order 
	{
		public Order(TransaqOrder order)
		{
			IsBuy = order.BuySell == BuySells.B;
			OrderNo = order.OrderNo;
			Quantity = order.Quantity;
			SecCode = order.SecCode;
			Time = order.Time.GetValueOrDefault();
		}

		[DataMember]
		public long OrderNo { get; set; }

		[DataMember]
		public string SecCode { get; set; }

		[DataMember]
		public bool IsBuy { get; set; }

		[DataMember]
		public DateTime Time { get; set; }

		[DataMember]
		public int Quantity { get; set; }
	}
}